home *** CD-ROM | disk | FTP | other *** search
- delay = getTimer();
- number = int("100" - (recharge - delay) / "20");
- if("30" < number and number < "60")
- {
- tellTarget("/sounds")
- {
- gotoAndPlay("Recharge_sound");
- }
- }
- tellTarget("/small_interface/recharge")
- {
- gotoAndStop(eval("/:number"));
- }
- if(fire == "1" or fire1 == "1")
- {
- if(first_step == "1")
- {
- alpha = eval("/dialctrl:alpha");
- }
- if("90" < alpha)
- {
- sign = - "1";
- angle_l = "180" - alpha;
- }
- else if("90" >= alfa)
- {
- sign = "1";
- angle_l = alpha;
- }
- x0_l = getProperty("/dialctrl", _X) + sign * "43.6" * eval("cos" add angle_l);
- y0_l = getProperty("/dialctrl", _Y) - "43.6" * eval("sin" add angle_l);
- if(first_step == "1")
- {
- setProperty("/laser1", _rotation, "180" - alpha);
- x_l = x0_l + sign * getProperty("/laser1", _width);
- y_l = y0_l - getProperty("/laser1", _height);
- x_l1 = x0_l + sign * getProperty("/laser1", _width) / "2";
- y_l1 = y0_l - getProperty("/laser1", _height) / "2";
- x_l2 = x0_l;
- y_l2 = y0_l;
- first_step = "0";
- tellTarget("/sounds")
- {
- gotoAndPlay("Laser_sound");
- }
- }
- k = "0";
- while("15" >= k)
- {
- k += "1";
- rocket_width = getProperty("/rocket1", _width);
- rocket_height = getProperty("/rocket1", _height);
- x_l += sign * getProperty("/laser1", _width) / rocket_width;
- y_l -= getProperty("/laser1", _height) / rocket_width;
- x_l1 += sign * getProperty("/laser1", _width) / rocket_width;
- y_l1 -= getProperty("/laser1", _height) / rocket_width;
- x_l2 += sign * getProperty("/laser1", _width) / rocket_width;
- y_l2 -= getProperty("/laser1", _height) / rocket_width;
- test1 = x_r1 - x_l;
- test2 = x_l - x_r1 + rocket_width;
- test3 = y_l - y_r1;
- test4 = y_r1 + rocket_height - y_l;
- if(test1 >= "0" and test2 >= "0" and test3 >= "0" and test4 >= "0")
- {
- test = "1";
- }
- test1 = x_r1 - x_l1;
- test2 = x_l1 - x_r1 + rocket_width;
- test3 = y_l1 - y_r1;
- test4 = y_r1 + rocket_height - y_l1;
- if(test1 >= "0" and test2 >= "0" and test3 >= "0" and test4 >= "0")
- {
- test = "1";
- }
- test1 = x_r1 - x_l2;
- test2 = x_l2 - x_r1 + rocket_width;
- test3 = y_l2 - y_r1;
- test4 = y_r1 + rocket_height - y_l2;
- if(test1 >= "0" and test2 >= "0" and test3 >= "0" and test4 >= "0")
- {
- test = "1";
- }
- test1 = x_r2 - x_l;
- test2 = x_l - x_r2 + rocket_width;
- test3 = y_l - y_r2;
- test4 = y_r2 + rocket_height - y_l;
- if(test1 >= "0" and test2 >= "0" and test3 >= "0" and test4 >= "0")
- {
- test = "2";
- }
- test1 = x_r2 - x_l1;
- test2 = x_l1 - x_r2 + rocket_width;
- test3 = y_l1 - y_r2;
- test4 = y_r2 + rocket_height - y_l1;
- if(test1 >= "0" and test2 >= "0" and test3 >= "0" and test4 >= "0")
- {
- test = "2";
- }
- test1 = x_r2 - x_l2;
- test2 = x_l2 - x_r2 + rocket_width;
- test3 = y_l2 - y_r2;
- test4 = y_r2 + rocket_height - y_l2;
- if(test1 >= "0" and test2 >= "0" and test3 >= "0" and test4 >= "0")
- {
- test = "2";
- }
- if(test == "1" or test == "2")
- {
- no_test += test;
- fire = "0";
- colision = "1";
- fire1 = "0";
- k = "20";
- x_l = "1000";
- y_l = "0";
- score += "100" - beta;
- set("/small_interface:score",score);
- no_hit_rocket = no_hit_rocket - int(no_hit_rocket / "6") * "6" + "1";
- set("/small_interface:message",eval("hit_rocket_message" add no_hit_rocket));
- if(test == "1")
- {
- setProperty("/explosion_air", _X, x_r1 - getProperty("/rocket1", _width) / "2");
- setProperty("/explosion_air", _Y, y_r1 + getProperty("/rocket1", _height) / "2");
- x_r1 = x0_r1 - "100";
- y_r1 = y0_r1 - "100";
- setProperty("/rocket1", _X, x_r1);
- setProperty("/rocket1", _Y, y_r1);
- }
- else if(test == "2")
- {
- setProperty("/explosion_air", _X, x_r2 - getProperty("/rocket2", _width) / "2");
- setProperty("/explosion_air", _Y, y_r2 + getProperty("/rocket2", _height) / "2");
- x_r2 = x0_r2 - "100";
- y_r2 = y0_r2 - "100";
- setProperty("/rocket2", _X, x_r2);
- setProperty("/rocket2", _Y, y_r2);
- }
- tellTarget("/explosion_air")
- {
- gotoAndPlay(2);
- }
- if(no_test >= "3")
- {
- gotoAndPlay(259);
- }
- else if(no_test < "3")
- {
- if(no_test == "1")
- {
- x_r1 = x0_r1 - "100";
- y_r1 = y0_r1 - "100";
- setProperty("/rocket1", _X, x_r1);
- setProperty("/rocket1", _Y, y_r1);
- }
- else if(no_test == "2")
- {
- x_r2 = x0_r2 - "100";
- y_r2 = y0_r2 - "100";
- setProperty("/rocket2", _X, x_r2);
- setProperty("/rocket2", _Y, y_r2);
- }
- gotoAndPlay(261);
- }
- }
- test = "0";
- }
- setProperty("/laser1", _X, x_l);
- setProperty("/laser1", _Y, y_l);
- colision = "0";
- test = "0";
- fire1 = "1";
- }
- beta = i * angle_step;
- if(beta >= "89")
- {
- if(no_test == "2" or no_test == "0")
- {
- y_r1 += rase * eval("sin" add angle_step);
- }
- if((no_test == "1" or no_test == "0") and no_level == "2")
- {
- y_r2 += rase * eval("sin" add angle_step);
- }
- angle_r = "180";
- }
- else if(beta < "89")
- {
- if(no_test == "2" or no_test == "0")
- {
- x_r1 = x0_r1 - rase * (eval("sin" add beta) - eval("sin" add "10"));
- y_r1 = y0_r1 + rase - rase * eval("cos" add beta);
- }
- if((no_test == "1" or no_test == "0") and no_level == "2")
- {
- x_r2 = x0_r2 - rase * (eval("sin" add beta) - eval("sin" add "10"));
- y_r2 = y0_r2 + rase - rase * eval("cos" add beta);
- }
- angle_r = "270" - beta;
- }
- if(no_test == "2" or no_test == "0")
- {
- setProperty("/rocket1", _X, x_r1);
- setProperty("/rocket1", _Y, y_r1);
- setProperty("/rocket1", _rotation, angle_r);
- }
- if((no_test == "1" or no_test == "0") and no_level == "2")
- {
- setProperty("/rocket2", _X, x_r2);
- setProperty("/rocket2", _Y, y_r2);
- setProperty("/rocket2", _rotation, angle_r);
- }
- i += "1";
- if("380" < y_r1)
- {
- if(x_r1 < "350" and x_r1 >= "0")
- {
- no_test += "1";
- no_hit_rocket = "0";
- life -= "1";
- score -= "50";
- if(score < "0")
- {
- score = "0";
- }
- set("/small_interface:score",score);
- setProperty("/explosion_city1", _X, x_r1 + "28");
- setProperty("/explosion_city1", _Y, y_r1);
- tellTarget("/explosion_city1")
- {
- gotoAndPlay(2);
- }
- tellTarget("/city")
- {
- nextFrame();
- }
- fire1 = "1";
- x_r1 = x0_r1 - "100";
- y_r1 = y0_r1 - "100";
- if(no_test >= "3")
- {
- gotoAndPlay(259);
- }
- }
- else if(x_r1 >= "350" and "640" >= x_r1)
- {
- no_test += "1";
- score -= "20";
- if(score < "0")
- {
- score = "0";
- }
- set("/small_interface:score",score);
- no_miss_city = no_miss_city - int(no_miss_city / "2") * "2" + "1";
- set("/small_interface:message",eval("miss_message" add no_miss_city));
- setProperty("/explosion_ground", _X, x_r1);
- setProperty("/explosion_ground", _Y, y_r1);
- tellTarget("/explosion_ground")
- {
- gotoAndPlay(2);
- }
- fire1 = "1";
- x_r1 = x0_r1 - "100";
- y_r1 = y0_r1 - "100";
- if(no_test >= "3")
- {
- gotoAndPlay(259);
- }
- }
- else if(x_r1 < "0" or "640" < x_r1)
- {
- x_r1 = x0_r1 - "100";
- y_r1 = y0_r1 - "100";
- setProperty("/rocket1", _X, x_r1);
- setProperty("/rocket1", _Y, y_r1);
- no_test += "1";
- no_miss_city = no_miss_city - int(no_miss_city / "2") * "2" + "1";
- set("/small_interface:message",eval("miss_message" add no_miss_city));
- if(no_test >= "3")
- {
- gotoAndPlay(259);
- }
- }
- }
- if("380" < y_r2)
- {
- if(x_r2 < "350" and x_r2 >= "0")
- {
- no_test += "2";
- no_hit_rocket = "0";
- life -= "1";
- score -= "50";
- if(score < "0")
- {
- score = "0";
- }
- set("/small_interface:score",score);
- setProperty("/explosion_city2", _X, x_r2 + "15");
- setProperty("/explosion_city2", _Y, y_r2);
- tellTarget("/explosion_city2")
- {
- gotoAndPlay(2);
- }
- tellTarget("/city")
- {
- nextFrame();
- }
- fire1 = "1";
- x_r2 = x0_r2 - "100";
- y_r2 = y0_r2 - "100";
- if(no_test >= "3")
- {
- gotoAndPlay(259);
- }
- else if(no_test < "3")
- {
- gotoAndPlay(261);
- }
- }
- else if(x_r2 >= "350" and "640" >= x_r2)
- {
- no_test += "2";
- score -= "20";
- if(score < "0")
- {
- score = "0";
- }
- set("/small_interface:score",score);
- no_miss_city = no_miss_city - int(no_miss_city / "2") * "2" + "1";
- set("/small_interface:message",eval("miss_message" add no_miss_city));
- setProperty("/explosion_ground", _X, x_r2);
- setProperty("/explosion_ground", _Y, y_r2);
- tellTarget("/explosion_ground")
- {
- gotoAndPlay(2);
- }
- fire1 = "1";
- x_r2 = x0_r2 - "100";
- y_r2 = y0_r2 - "100";
- if(no_test >= "3")
- {
- gotoAndPlay(259);
- }
- else if(no_test < "3")
- {
- gotoAndPlay(261);
- }
- }
- else if(x_r2 < "0" or "640" < x_r2)
- {
- x_r2 = x0_r2 - "100";
- y_r2 = y0_r2 - "100";
- setProperty("/rocket2", _X, x_r2);
- setProperty("/rocket2", _Y, y_r2);
- no_test += "2";
- no_miss_city = no_miss_city - int(no_miss_city / "2") * "2" + "1";
- set("/small_interface:message",eval("miss_message" add no_miss_city));
- if(no_test >= "3")
- {
- gotoAndPlay(259);
- }
- else if(no_test < "3")
- {
- gotoAndPlay(261);
- }
- }
- }
- else
- {
- gotoAndPlay(261);
- }
-